package com.zsc.oj.judge.codesandbox;

import com.zsc.oj.judge.codesandbox.model.ExecuteCodeRequest;
import com.zsc.oj.judge.codesandbox.model.ExecuteCodeResponse;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class CodeSendBoxProxy implements CodeSendBox {

    private CodeSendBox codeSendBox;

    public CodeSendBoxProxy(CodeSendBox codeSendBox){
        this.codeSendBox = codeSendBox;
    }

    @Override
    public ExecuteCodeResponse ExecuteCode(ExecuteCodeRequest executeCodeRequest) {
        log.info("代码沙箱请求信息" + executeCodeRequest.toString());
        ExecuteCodeResponse executeCodeResponse = codeSendBox.ExecuteCode(executeCodeRequest);
        log.info("代码沙箱响应信息" + executeCodeRequest.toString());
        return executeCodeResponse;
    }
}
